#pragma once
#include "IndexedGeometry.h"

/**
* Wraps an index buffer to be able to draw lines.
* @author Koen Samyn
*/
class LineList: public IndexedGeometry
{

public:
	/**
	* Creates a new linelist.
	* @param nrOfLines the number of lines to create.
	*/
	LineList(int nrOfLines);
	/**
	* Destroys the line list.
	*/
	virtual ~LineList(void);
	/**
	* Adds an indexed line.
	*/
	void AddIndexedLine(unsigned int index1,unsigned int index2);
	/**
	* Gets the size in bytes of this indexed geometry.
	* @return the size in bytes.
	*/
	unsigned int GetSizeInBytes();
	/**
	* Returns a pointer to the internal indexbuffer.
	* @return a pointer to the indices.
	*/
	void* GetData(){return m_Indices;}
		/**
	* Returns the type of primitive.
	* @return the primitive type.
	*/
	PRIMITIVE GetPrimitiveType(){ return LINES;}
	/**
	* Returns the number of primitives to draw.
	* @return the number of primitives.
	*/
	int GetNumberOfPrimitives(){
		return m_NrOfLines;
	}
private:
	int m_CurrentIndex;
	int m_NrOfLines;
	bool m_Valid;
	unsigned int * m_Indices;

	// -------------------------
	// Disabling default copy constructor and default assignment operator.
	// If you get a linker error from one of these functions, your class is internally trying to use them. This is
	// an error in your class, these declarations are deliberately made without implementation because they should never be used.
	// -------------------------
	LineList(const LineList& t);
	LineList& operator=(const LineList& t);
};
